package com.atguigu.designpattern.strategy;

/**
* @program: springcloud
* @description: 打折类
* @author: wangjun
* @create: 2021-05-18
**/
public class CashRebate implements CashSuper{

    private double rebate = 1d;

    public CashRebate(double rebate) {
        this.rebate = rebate;
    }

    @Override
    public double acceptCash(double money) {
        return money * rebate;
    }
}
